import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from 'typeorm';
import { LessonsSort } from '../../lessons-sort/entities/lessons-sort.entity';

/**
 * 模块名:上课时间表
 */
@Entity()
export class TimeSlot {
  @PrimaryGeneratedColumn()
  timeSlot_id: number;

  // @Column({ comment: '周一，周二，周三，周周四，周五，周六，周日，' })
  // day_of_week: string;

  @Column({ type: 'time', comment: '开始上课时间' })
  start_date: Date;

  @Column({ type: 'time', comment: '结束上课时间' })
  end_date: Date;

  @Column({ type: 'boolean' })
  isDel: boolean;

  @ManyToMany(() => LessonsSort, (lessonsSort) => lessonsSort.timeSlots)
  lessonsSorts: LessonsSort[];
}
